<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$setting=$this->plugin_setting('basic'.$_SESSION['onemerchid']);
set_html('title','我的二维码');
$mid=$_RQ['mid']?:$_SESSION['uid'];

if($_RQ['op']=='main'){
	if(!$_RQ['fromuser']){
		$return['ischecklogin']=cfc('core')->checklogin('','',true);
	}else{
		$return['isfromuser']=1;
	}

	if(!$setting['closed_qrcode']){
		exi('没有开启邀请二维码,请联系管理员','error','/worker.home/');
	}
  
	$url=custom_url('jy_yiliao/set//mid='.$mid.'&fromuser='.$_SESSION['uid'],true);
	$return['qrcode']=cfc('tools')->createqrcode($url,'250',true);
	$return['qrcode']=tomedia($return['qrcode']);
	
	$member=model('core/member')->basic($_SESSION['uid']);
	$member['mid']=$_SESSION['uid'];
	$return['member']=$member;
	$return['sharedata']=array(
			'title'=>'【张三】民医邀请进行预约就诊',
			'desc'=>'为您的健康保驾护航',
			'link'=>$url,
			'imgUrl'=>tomedia($setting['logo']),
	);
	exi($return);
}

?>